
export function getTargetById (targetArr, targetId) {
    let target
    targetArr.find(item => {
        if(item.cat_id === targetId) {
            target = item
            return true
        } else {
            if(item.children?.length > 0) {
                target = getTargetById(item.children, targetId)
            }
        }
    })
    return target
}

